<?php

/**
 * page actions.
 *
 * @package    proba3
 * @subpackage page
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class pageActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request)
  {
    // Try to create new page
      $this->page = new Page();
$this->create_links();
$this->save();

    //$this->forward('default', 'module');
  }

  private function create_links()
  {
      $this->page->setUrl('Probna stranica 2');
      $this->page->Link[]->url='Prvi link';
      $this->page->Link[]->url='Drugi link';


  }

  private function save()
  {
            $this->page->save();
  }
}
